﻿/*
Medion Info Display

Copyright 2010 Wolf Posdorfer,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MD8800.util
{
    /// <summary>
    /// beeinhaltet die Opcodes für das Display
    /// </summary>
    public static class opcodes
    {
        //===================================================================
        //                            SYSTEM
        //===================================================================
        public static String CLEAR = ("" + (char)31);
        public static String CLEAR_TEXT = ("" + (char)27 + (char)80);
        public static String TEST_MODE = ("" + (char)27 + (char)84);
        public static String SET_TIME = ("" + (char)27 + (char)0); //Minute Stunde Monat Tag Jahr Jahr  //1B 00 45 17 12 24 20 05
        public static String EURO_TIME = ("" + (char)27 + (char)1);
        public static String USA_TIME = ("" + (char)27 + (char)2);
        public static String CENTER_CLOCK = ("" + (char)27 + (char)3);
        public static String JUMPING_CLOCK = ("" + (char)27 + (char)4);
        //===================================================================
        //                            CONTROLS
        //===================================================================
        public static String HDD = ("" + (char)27 + (char)48 + (char)0);// + (char)3);
        public static String FIREWIRE = ("" + (char)27 + (char)48 + (char)1);// + (char)0);
        public static String DISC = ("" + (char)27 + (char)48 + (char)2);// + (char)0);
        public static String USB = ("" + (char)27 + (char)48 + (char)3);// + (char)0);
        public static String MOVIE = ("" + (char)27 + (char)48 + (char)4);// + (char)0);
        public static String TV = ("" + (char)27 + (char)48 + (char)5);// + (char)0);
        public static String MUSIC = ("" + (char)27 + (char)48 + (char)6);// + (char)0);
        public static String CAMERA = ("" + (char)27 + (char)48 + (char)7);// + (char)0);
        public static String REC = ("" + (char)27 + (char)48 + (char)8);// + (char)0);
        public static String MAIL_ENV_WHITE = ("" + (char)27 + (char)48 + (char)9);// + (char)0);
        public static String MAIL_ENV_RED = ("" + (char)27 + (char)48 + (char)10);// + (char)0);
        public static String VOLUME_1 = ("" + (char)27 + (char)48 + (char)11);// + (char)1);
        public static String VOLUME_2 = ("" + (char)27 + (char)48 + (char)12);// + (char)1);
        public static String VOLUME_3 = ("" + (char)27 + (char)48 + (char)13);// + (char)1);
        public static String VOLUME_4 = ("" + (char)27 + (char)48 + (char)14);// + (char)1);
        public static String VOLUME_5 = ("" + (char)27 + (char)48 + (char)15);// + (char)1);
        public static String VOLUME_6 = ("" + (char)27 + (char)48 + (char)16);// + (char)1);
        public static String VOLUME_7 = ("" + (char)27 + (char)48 + (char)17);// + (char)1);
        public static String VOLUME_RED_BORDER = ("" + (char)27 + (char)48 + (char)18);//+ (char)1);
        public static String SPEAKER = ("" + (char)27 + (char)48 + (char)19);// + (char)1);
        public static String SPEAKER_MUTE = ("" + (char)27 + (char)48 + (char)20);// + (char)1);
        public static String SPEAKER_RED_1 = ("" + (char)27 + (char)48 + (char)21);// + (char)1);
        public static String SPEAKER_RED_2 = ("" + (char)27 + (char)48 + (char)22);// + (char)1);
        public static String SPEAKER_RED_3 = ("" + (char)27 + (char)48 + (char)23);// + (char)1);
        public static String HDD_BORDER = ("" + (char)27 + (char)48 + (char)24);// + (char)1);
        public static String MOVIE_BORDER = ("" + (char)27 + (char)48 + (char)25);// + (char)1);
        public static String GRAPHIC_BORDER = ("" + (char)27 + (char)48 + (char)26);// + (char)1);
        public static String MAIL_BORDER = ("" + (char)27 + (char)48 + (char)27);// + (char)1);
        public static String VOLUME_BORDER = ("" + (char)27 + (char)48 + (char)28);// + (char)1);

        public static String CD_ROTATE_0 = "" + (char)27 + (char)50 + (char)0;
        public static String CD_ROTATE_1 = "" + (char)27 + (char)50 + (char)1;
        public static String CD_ROTATE_2 = "" + (char)27 + (char)50 + (char)2;
        public static String CD_ROTATE_3 = "" + (char)27 + (char)50 + (char)3;
        public static String CD_ROTATE_4 = "" + (char)27 + (char)50 + (char)4;

        public static String VCR_FLASH_0 = "" + (char)27 + (char)51 + (char)0;
        public static String VCR_FLASH_1 = "" + (char)27 + (char)51 + (char)1;
        public static String VCR_FLASH_2 = "" + (char)27 + (char)51 + (char)2;
        public static String VCR_FLASH_3 = "" + (char)27 + (char)51 + (char)3;
        public static String VCR_FLASH_4 = "" + (char)27 + (char)51 + (char)4;

        //0x1B 0x34 x - klein LS geht aus

        //===================================================================
        //                            REIHEN
        //===================================================================
        public static String ROW_FIRST = ("" + (char)27 + (char)33);
        public static String ROW_SECOND = ("" + (char)27 + (char)34);
        //===================================================================
        //                            BRIGHTNESS
        //===================================================================
        public static String BRIGHT_0 = ("" + (char)0);
        public static String BRIGHT_1 = ("" + (char)1);
        public static String BRIGHT_2 = ("" + (char)2);
        public static String BRIGHT_3 = ("" + (char)3);

        //===================================================================
        //                            GRAPHIC DISPLAY
        //===================================================================

        public static String GRAPHIC_PLAY = "" + (char)27 + (char)49 +(char)0 + (char)0 + (char)0 + (char)0 + (char)0 +(char)8 +(char)28+ (char)62+ (char)127 ;
        public static String GRAPHIC_PAUSE = "" + (char)27 + (char)49 +(char)0 + (char)0 + (char)0 + (char)0 + (char)127 + (char)127 + (char)0 + (char)127 + (char)127;
        public static String GRAPHIC_REWIND = "" + (char)27 + (char)49 + (char)127 + (char)62 + (char)28 + (char)8 + (char)0 + (char)127 + (char)62 + (char)28 + (char)8;
        public static String GRAPHIC_FORWARD = "" + (char)27 + (char)49 + (char)8 + (char)28 + (char)62 + (char)127 + (char)0 + (char)8 + (char)28 + (char)62 + (char)127;
    }


    /*
    Graphical display (9*7 px)
    1B 31 C9 C8 C7 C6 C5 C4 C3 C2 C1
    PLAY:
           c 123456789
    r1 1     X........
    r2 2     XX.......
    r3 4     XXX......
    r4 8     XXXX.....
    r5 16    XXX......
    r6 32    XX.......
    r7 64    X........

    c1 64+32+16+8+4+2+1 = 127 = 7F 
    c2 32+16+8+4+2 = 62 = 3E
    c3 16+8+4 = 28 = 1C
    c4 8 = 8 = 8
    c5 0
    c6 0
    c7 0
    c8 0
    c9 0
    27 49  // rückwärts 127 62 28 8 0 0 0 0 0
     
    PAUSE:
           c 123456789
    r1 1     XX.XX....
    r2 2     XX.XX....
    r3 4     XX.XX....
    r4 8     XX.XX....
    r5 16    XX.XX....
    r6 32    XX.XX....
    r7 64    XX.XX....

    c1 64+32+16+8+4+2+1 = 127 = 7F 
    c2 64+32+16+8+4+2+1 = 127 = 7F 
    c3 0
    c4 64+32+16+8+4+2+1 = 127 = 7F
    c5 64+32+16+8+4+2+1 = 127 = 7F
    c6 0
    c7 0
    c8 0
    c9 0
      
    27 49 //rückwärts 127 127 0 127 127 0 0 0 0 
    
    FORWARD:
           c 123456789
    r1 1     X....X...
    r2 2     XX...XX..
    r3 4     XXX..XXX.
    r4 8     XXXX.XXXX
    r5 16    XXX..XXX.
    r6 32    XX...XX..
    r7 64    X....X...

    c1 64+32+16+8+4+2+1 = 127 = 7F 
    c2 32+16+8+4+2 = 62 = 3E
    c3 16+8+4 = 28 = 1C
    c4 8 = 8 = 8
    c5 0
    c6 64+32+16+8+4+2+1 = 127 = 7F 
    c7 32+16+8+4+2 = 62 = 3E
    c8 16+8+4 = 28 = 1C
    c9 8 = 8 = 8
      
    27 49 //rückwärts 127 62 28 8 0 127 62 28 8 

    REWIND:
           c 123456789
    r1 1     ...X....X
    r2 2     ..XX...XX
    r3 4     .XXX..XXX
    r4 8     XXXX.XXXX
    r5 16    .XXX..XXX
    r6 32    ..XX...XX
    r7 64    ...X....X

    c1 8 = 8 = 8
    c2 16+8+4 = 28 
    c3 32+16+8+4+2 = 62 
    c4 64+32+16+8+4+2+1 = 127 
    c5 0
    c6 8 = 8 = 8
    c7 16+8+4 = 28 
    c8 32+16+8+4+2 = 62 
    c9 64+32+16+8+4+2+1 = 127 

    27 49 //rückwärts 8 28 62 127 0 8 28 62 127
    */

}





